{% extends "base.html" %}
{% block title %}
    Sign in
{% endblock title %}
{% block body_class %}
    login
{% endblock body_class %}
{% block content -%}
    <div class="container">
        <form action="" method="post">
            {% if form.has_errors() %}
                <div class="form-errors">
                    {% for error in form.errors_for(FormErrorTarget::Form) %}{{ error }}{% endfor %}
                </div>
            {% endif %}
            <div class="form-row">
                <label for="{{ form.username.id() }}">Username:</label>
                {{ form.username }}
                {% for error in form.errors_for(FormErrorTarget::Field("username")) %}{{ error }}{% endfor %}
            </div>
            <div class="form-row">
                <label for="{{ form.password.id() }}">Password:</label>
                {{ form.password }}
                {% for error in form.errors_for(FormErrorTarget::Field("password")) %}{{ error }}{% endfor %}
            </div>
            <div class="button-box">
                <button class="btn primary" type="submit">Sign in</button>
            </div>
        </form>
    </div>
{%- endblock content %}
